<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    

    <!-- 3、小王入职薪水10k,每年涨幅5%，10年后小王的月薪为多少，总收入为多少？ -->

    <script>
        var num=2;
        var money=10000;
        var rich=0;
        while(num<=10){
            var money=money*0.05+money;
            var rich=money*12+rich;
            num++;
        }
        console.log('10年后小王月薪为' + money + '元');
        console.log('10年后小王总收入为' + rich + '元');
    </script>


<!-- ------------------------------------------------------------- -->
</body>
</html>